Prevent the intellifire client from polling independently of its coordinator#165341
Conversation
76fcaec to
e6f8c22
Compare
|
Could you have this as release note on the client repo, and link to that from here?
|
There was a problem hiding this comment.
Pull request overview
Updates the IntelliFire integration to rely on Home Assistant’s coordinator-driven polling rather than the intellifire4py client polling independently, improving responsiveness after state changes.
Changes:
- Bump
intellifire4pydependency from4.3.1to4.4.0. - Disable library-side polling at fireplace construction time and trigger polling from the coordinator (
perform_poll()). - Add/extend tests and mocks to validate coordinator-driven polling behavior.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
homeassistant/components/intellifire/__init__.py |
Passes a flag to disable library polling when constructing the UnifiedFireplace. |
homeassistant/components/intellifire/coordinator.py |
Calls fireplace.perform_poll() during coordinator refresh to explicitly drive polling. |
homeassistant/components/intellifire/manifest.json |
Pins integration requirement to intellifire4py==4.4.0. |
requirements_all.txt |
Updates global pin for intellifire4py to 4.4.0. |
requirements_test_all.txt |
Updates test pin for intellifire4py to 4.4.0. |
tests/components/intellifire/conftest.py |
Extends the fireplace mock to include perform_poll. |
tests/components/intellifire/test_init.py |
Adds tests asserting coordinator-driven polling and polling-disabled construction. |
You can also share your feedback on Copilot code review. Take the survey.
|
Please address Copilot's points- mark them/mine as resolved, and re-request review from me when you're ready. |
epenet
left a comment
There was a problem hiding this comment.
Can the library bkmp be done in a preliminary PR?
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
01fe66a to
2bfd2e8
Compare
Test seems to be good now
…dinator (#165341) Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Robert Resch <robert@resch.dev> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Proposed change
In the current mode of operation Home Assistant issues a change request to the fireplace via the backing library, then waits until the next coordinator poll to pick up the new state. Meanwhile the backing library is also running its own internal polling loop, resulting in duplicate polls and slower responsiveness.
This PR fixes that by:
polling_enabled=Falsewhen constructing theUnifiedFireplace, disabling the library's internal polling loopperform_poll()directly from the coordinator's_async_update_data(), so HA controls all pollingThe required library changes (
perform_poll()andpolling_enabledflag) landed inintellifire4py==4.4.0, which was bumped in the preliminary PR #165356.Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
requirements_all.txt.To help with the load of incoming pull requests: